package com.lv.hechuang.retrofithttp;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * Created by Administrator on 2017/9/5.
 */

public interface HttpMethod {

    @GET
    Call<ResponseBody> getMethod(@Header("Authorization") String auth, @Header("appverid") String appverid, @Header("employee-auth") String employee_auth, @Url String urlPath, @QueryMap Map<String, String> params);

    @FormUrlEncoded
    @POST
    Call<ResponseBody> postMethod(@Header("Authorization") String auth, @Header("appverid") String appverid, @Header("employee-auth") String employee_auth, @Url String urlPath, @FieldMap Map<String, String> param);

    @FormUrlEncoded
    @POST
    Call<ResponseBody> registPostMethod(@Header("Authorization") String auth, @Header("appverid") String appverid, @Header("employee-auth") String employee_auth, @Url String urlPath, @FieldMap Map<String, String> param);

    //文件上传
    @POST
    Call<ResponseBody> uploadFileOrImage(@Header("Authorization") String auth, @Header("appverid") String appverid, @Url String urlPath, @Body RequestBody Body);

    @GET
    Call<ResponseBody> getAddHeadMethod(@Header("Authorization") String auth, @Header("appverid") String appverid, @Header("employee-auth") String employee_auth, @Url String urlPath, @QueryMap Map<String, String> params);


}
